package com.example.musicserver.mapper;

import com.example.musicserver.model.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestParam;

@Mapper
public interface UserInfoMapper {
    @Select("select username,password from user where username = #{username}")
    UserInfo queryByName(String username);

    @Insert("insert into user values(null,#{username},#{password})")
    Integer registry(@Param("username") String username, @Param("password") String password);
}
